﻿using Castle.MicroKernel.Registration;
using Castle.Windsor;
using NUnit.Framework;

namespace WindsorInitConfig {
    [TestFixture]
    public class Forwarding {
        public interface InterfaceA {}

        public interface InterfaceB {}

        public class ClassAB: InterfaceA, InterfaceB {}

        [Test]
        public void tt() {
            var container = new WindsorContainer();
            container.Register(Component.For<InterfaceA, InterfaceB>().ImplementedBy<ClassAB>());
            var a = container.Resolve<InterfaceA>();
            var b = container.Resolve<InterfaceB>();
            Assert.AreSame(a, b);
        }
    }
}